export default {
  namespaced: true,
  state: {
    dialogVisible: false,
    options: {},
  },
  getters: {

  },
  mutations: {
    OPEN_DIALOG(state, payload) {
      state.dialogVisible = true;
      state.options = payload;
    },
    CLOSE_DIALOG(state) {
      state.dialogVisible = false;
    },
    CLEAR_OPTIONS(state) {
      state.options = {};
    },
  },
  actions: {
    openDialog({ commit }, payload) {
      commit('OPEN_DIALOG', payload);
    },
    closeDialog({ commit }) {
      commit('CLOSE_DIALOG');
    },
    clearOptions({ commit }) {
      commit('CLEAR_OPTIONS');
    },
  },
};
